<template>
  <div class="app-container">
      <!--表格渲染-->
      <el-table class="tl-table" ref="mainTable" :height="300" resizable-key="tableHeight" :resizable-refs="tableResizeRefs" v-loading="loading" :data="datas" @selection-change="doSelectChange" @sort-change="doSortChange" @row-dblclick="doRowDbClick" @row-click="doRowClick" row-key="id" border fit :row-class-name="doChangeRowClassName">
        <el-table-column type="index" label="序号" width="55px" align="center"></el-table-column>
				<el-table-column prop="name" label="姓名" width="150px" sortable="custom" sort-by="name" align="center" header-align="center" :show-overflow-tooltip="true"></el-table-column>
				<el-table-column prop="code" label="工号" width="150px" sortable="custom" sort-by="code" align="center" header-align="center" :show-overflow-tooltip="true"></el-table-column>
				<el-table-column prop="deptname" label="部门名称" min-width="150px" sortable="custom" sort-by="deptname" align="left" header-align="center" :show-overflow-tooltip="true"></el-table-column>
				<el-table-column prop="dispjudgeresult" label="评价结果" width="150px" sortable="custom" sort-by="judgeresult" align="center" header-align="center">
          <template slot-scope="scope">
            <el-select v-model="datas[scope.$index].judgeresult" filterable clearable>
              <el-option v-for="item in codeModel.judgeresultList" :key="item.code" :label="item.name" :value="item.code" />
            </el-select>
          </template>
        </el-table-column>
      </el-table>
  </div>
</template>

<script>
/** mixins */
import { mixin_list } from '@tapui/mixins/mixin_list'
/** 工具类 */
import { getAction, putAction, postAction, deleteAction } from '@tapui/utils/http'
export default {
  name: 'mpmProjectPerformanceJudge',
  mixins: [mixin_list],
  components: { },
  data() {
    return {
      description: '复盘绩效评价表-列表查询',
      urlPrefix: '/mpm/projectPerformanceJudge/',
      url: {
        queryCodeList: '/mpm/projectPerformanceJudge/dataCodeList'
      },
      // 排序参数
      sorterInfo: {
        sidx: 'length(code) asc, code',
        sord: 'asc'
      },
      pageInfo: {
        currentPage: 1, // 当前页面
        pageSize: 1000, // 每页记录数
        pageSizes: ['10', '50', '100'],
        totalCount: 0 // 总数
      },
      isQueryOnCreated: false
    }
  },
  props: {
    model: {
      type: Object,
      default: () => {}
    }
  },
  methods: {
    beforeLoadData() {
      if (!this.model.projectcode) {
        return false
      }
      this.queryParam.qry_projectcode = this.model.projectcode
      this.queryParam.qry_enabled = '1'
      return true
    }
  }
}
</script>

<style scoped></style>

